package Problem6;

public class Main {

	public static void main(String[] args) {
		System.out.println(squareOfSums(0, 0, 100) - sumOfSquares(0, 0, 100));
	}
	
	public static int sumOfSquares(int cursor, int runningTotal, int stoppingPoint){
		if (cursor > stoppingPoint)
			return runningTotal;
		runningTotal += cursor * cursor;
		cursor++;
		return sumOfSquares(cursor, runningTotal, stoppingPoint);
	}
	public static int squareOfSums(int cursor, int runningTotal, int stoppingPoint){
		if (cursor > stoppingPoint)
			return runningTotal * runningTotal;
		runningTotal += cursor;
		cursor++;
		return squareOfSums(cursor, runningTotal, stoppingPoint);
	}
}
